﻿using OABLL;
using OAModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace MyOA
{
    public partial class zhanneixin : Form
    {
        public string _yuangongid = string.Empty;

        zhanneixinBLL bll = new zhanneixinBLL();

       

        public zhanneixin(string oa)
        {

            InitializeComponent();
            _yuangongid = oa;

        }

       





        //页面加载时出现数据
        private void zhanneixin_Load(object sender, EventArgs e)
        {
            List<zhanneixinEntity> list = bll.Getznx(_yuangongid);

            for (int i = 0; i < list.Count; i++)
            {
                zhanneixinEntity user = list[i];
                ListViewItem item = new ListViewItem();
                item.Text = user.Oa员工id;
            
                item.SubItems.Add(user.Oa信息内容);
                
                item.SubItems.Add(user.Oa信息编号.ToString());
                item.SubItems.Add(user.Oa信息发送时间.ToString());
                
                //把封装好的数据添加到每一行 
                this.listView1.Items.Add(item);
            }
        }




        private void button1_Click_1(object sender, EventArgs e)
        {
            this.Close();
        }

        private void 查看详情ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string Oa信件内容 = this.listView1.SelectedItems[0].SubItems[1].Text.Trim();
            new UserInfo(_yuangongid,Oa信件内容).Show();
        }
        




    }
    }
    
